terraform {
  backend "s3" {
    endpoint = "https://s3.deeproute.cn:9000"
    bucket = "terraform"
    key = "internal-gateway/services/initial-system"
    region = "main"
    skip_credentials_validation = true
    skip_metadata_api_check = true
    skip_region_validation = true
    force_path_style = true
  }
}

module "init_system" {
  source = "git@code.deeproute.ai:deeproute/ops-terraform.git//ansible_provisioner?ref=module.v1.0.1"

  arguments = [
    "--user=devops",
    "-b",
    "-i hosts.yml"
  ]
  envs      = [
    "host=all",
    "ansible_python_interpreter=/usr/bin/python3"
  ]
  playbook  = "../../../playbooks/common/init-system-v2.yml"
  dry_run   = false
}